//
//  GYRegisterTextfieldView.m
//  research
//
//  Created by 章鱼 on 17/3/28.
//  Copyright © 2017年 simon. All rights reserved.
//

#import "GYRegisterTextfieldView.h"

@implementation GYRegisterTextfieldView

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self  setIconTextfieldView];
        [self setBackgroundColor:[UIColor whiteColor]];
        self.layer.borderColor = [UIColor orz_stroke].CGColor;
        self.layer.borderWidth = 0.5f;
    }
    return self;
}

- (void)setIconTextfieldView {
    _titleLable = [[UILabel alloc] init];
    _titleLable.textColor = [UIColor colorWithHex:@"474747" alpha:1];
    _titleLable.font = [UIFont systemFontOfSize:13];
    [self addSubview:_titleLable];
    
    _textFiled = [[UITextField alloc] init];
    [self addSubview:_textFiled];
    _textFiled.font = [UIFont systemFontOfSize:13];
    _textFiled.textAlignment = NSTextAlignmentLeft;
    _textFiled.textColor = [UIColor orz_textTitle];
    
    [self setUI];
}

- (void)setUI {
    [_titleLable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self);
        make.left.mas_equalTo(12.f);

    }];
    
    [_textFiled mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self);
        make.left.mas_equalTo(_titleLable.mas_right).offset(11.f);
        make.width.mas_equalTo(self);
        make.height.mas_equalTo(self);
        
    }];
}


@end
